<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductType extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product_types', function (Blueprint $table) {
            $table->unsignedInteger('type_id')->comment('商品类型ID');
            // $table->foreign('type_id')->references('id')->on('types');
            $table->unsignedInteger('product_id')->comment('商品ID');
            // $table->foreign('product_id')->references('id')->on('products');
         });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
         Schema::dropIfExists('product_types');
    }
}
